package com.ruoyi.sample.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.SecurityUtils;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Date;

@Data
@Component
public class SampleLz {
    private Long id;
    private Long sampleId;
    private String message;
    private Long userId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;
    private String sampleQuantity;
    private String sampleSize;
    //补充字段
    private String sampleName;
    private String userName;


    public SampleLz() {
    }

    public SampleLz(Long sampleId, String message, String sampleQuantity, String sampleSize) {
        this.sampleId = sampleId;
        this.message = message;
        this.sampleQuantity = sampleQuantity;
        this.sampleSize = sampleSize;
        this.date= new Date();
        this.userId= SecurityUtils.getUserId();
    }
}
